package com.example.workrecord.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Entity
@Data
@Table(name="my_guest")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModel(description = "展览嘉宾")
@EntityListeners(AuditingEntityListener.class)
public class Guest implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue()
    @ApiModelProperty(value = "主键")
    private Long id;



    @ApiModelProperty(value = "类别")
    private Integer  category;

    @ApiModelProperty(value = "展览名称")
    private String  log;
    @ApiModelProperty(value = "简称")
    private String  company_url;
    @ApiModelProperty(value = "展览名称")
    private String  company_name;
    @ApiModelProperty(value = "简称")
    private String  company_profile;
    @ApiModelProperty(value = "展览名称")
    private String  company_address;
    @ApiModelProperty(value = "简称")
    private String  company_mob;
    @ApiModelProperty(value = "展览名称")
    private String  type;
    @ApiModelProperty(value = "简称")
    private String  introduce_url;
    @ApiModelProperty(value = "展览名称")
    private String  introduce;
    @ApiModelProperty(value = "简称")
    private String  case_url;
    @ApiModelProperty(value = "展览名称")
    private String  cases;
    @ApiModelProperty(value = "简称")
    private String  mien_url;
    @ApiModelProperty(value = "展览名称")
    private String  mien;
    @ApiModelProperty(value = "简称")
    private Integer  status;

    @ApiModelProperty(value = "简称")
    private String  createUser;

    @ApiModelProperty(value = "简称")
    private String  vnote1;
    @ApiModelProperty(value = "简称")
    private String  vnote2;
    @ApiModelProperty(value = "简称")
    private String  vnote3;

    @Transient
    @ApiModelProperty(value="子表")
    private List<Alumni> alumniList;

    /**
     * 分页游标
     */
    @ApiModelProperty(value = "分页游标")
    private Integer offset;


    /**
     * 分页大小
     */
    @ApiModelProperty(value = "分页大小")
    @Transient
    private Integer limit;

    /**
     * 创建时间
     */
    @CreatedDate
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @LastModifiedDate
    @Column(name = "modify_time")
    private Date modifyTime;




}
